package com.ssy.lingxi.platform.manage.controller.feign;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.platform.manage.api.model.dto.site.SiteIdDTO;
import com.ssy.lingxi.platform.manage.service.ISiteService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * 站点设置内部类
 * @author lqa
 * @version 2.0.0
 * @date 2022/3/7
 */
@RestController
@RequestMapping("/manage/paas/site/feign")
public class SiteFeignController {
    @Resource
    private ISiteService siteService;

    /**
     * 判断站点是否开启SAAS多租户(内部接口)
     ** @return 操作结果为boolean值
     */
    @PostMapping("/enableMultiTenancy")
    public Wrapper<Boolean> enableMultiTenancy(@RequestBody @Valid SiteIdDTO dto) {
        return siteService.enableMultiTenancy(dto.getSiteId());
    }

}
